package com.daihou.utils;

import java.util.Locale;
import java.util.ResourceBundle;

public class ConfigOthers {
	private static ResourceBundle bundle = ResourceBundle.getBundle("app_Others", Locale.CHINA);

	public static String getUrl(String name) {
		String address;
		if(name.equals("HUANKUAN"))
		{
			//这里是获取 后端地址，因为账务回调的贷后的后端
			address = bundle.getString("huidiao.uri");
		}
		else if(name.equals("YUQIZONGE"))
		{
			//三方-逾期总额查询接口，待定
			address = bundle.getString("huidiao.uri");
		}
		else //其他访问前端
		{
			address = bundle.getString("DaiHou_URL");
		}
		String uri = "";
		String testUrl;
		//这里做个转换，把输入的 DAORU 转换为 daoru.uri
		String canshu = name.toLowerCase() + ".uri";
		uri = bundle.getString(canshu);
		testUrl = address + uri;
		return testUrl;
	}
}
